<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="/WEB-INF/tag/pagetag.tld" prefix="p"%>
<%@ taglib uri="/WEB-INF/tag/pageform.tld" prefix="pf" %>
<%@ page trimDirectiveWhitespaces="true"%>
<html>
<head>
<meta charset="utf-8">
<title>Welcome</title>
<!-- 静态引入 -->
<c:import url="/WEB-INF/views/config/include.jsp" charEncoding="UTF-8" />
<!-- 以下是页面引入文件配置 -->
<link href="/custom/framework/css/menuicon.css?20190617" rel="stylesheet" media="screen">
<link href="/custom/framework/css/manager-main.css?20190617" rel="stylesheet" media="screen">
<link href="/custom/framework/css/mainmenu.css?20190617" rel="stylesheet" media="screen">
<style type="text/css">
* {
  color: white;
}
body {
  color: white;
}
.main_title2 {
	border-bottom: 1px solid #d4d4d4;
}
.tool_title2 {
	color: #A0A0A0;
	
}
.level1Menu {
  color: white;
}
.level2Menu{
  color: white;
}
.icon {
	color: white;
}
.td_user_name {
	color: white;
	width: 80px;
	text-align: center;
}
</style>
</head>
<body class="body">

<jsp:include page="/WEB-INF/views/config/popbox.jsp">
	<jsp:param value="${token}" name="token"/>
</jsp:include>

  <form action="/" id="blankForm" name="blankForm" target="BizFrame" method="POST">
    <pf:token data="${token}"/>
  </form>
  <form action="/pc/1.0/manager/logout" id="userForm" name="userForm" method="POST">
    <pf:token data="${token}"/>
  </form>
  <table style="height: 100%">
     <tr style="height: 80px;">
		<!-- 这里是左上用户信息 -->
		<td class="main_title main_title2" style="width: 220px;height: 100%">
			<table>
			     <tr>
					<td class="td_user_name" rowspan="2"><!--  onclick="javascript:userForm.submit();"  -->
					  <img style="height: 72px;width: 72px; border: 1px solid #d4d4d4;" src="/public/logo.png">
					</td>
					<td valign="bottom">${loginer.userName}</td>
			     </tr>
			     <tr style="height: 1px;">
					 <td style="" valign="top">Manager</td>
			     </tr>
			</table>
		</td>
		<!-- 这里是右上功能条用户信息 -->
		<td>
			<table style="background-color: white;border-bottom: 1px solid #d4d4d4"> 
   				<!-- 一级菜单 -->	   			
				<tr>		
					<td colspan="3">
						<table style="width: 518px;">
							<tr style="width: 518px;height: 37px">
								<td style="width: 18px;"></td>
								<td class="level0Menu">一级菜单</td>
								<td class="level0Menu">一级菜单</td>
								<td class="level0Menu">一级菜单</td>
								<td class="level0Menu">一级菜单</td>
								<td class="level0Menu">一级菜单</td>
							</tr>
						</table>
					</td>
   					<!-- 左右分割线 -->
					<td class="cursor" style="width: 80px;text-align: center;" rowspan="2" onclick="javascript:userForm.submit();">
					   <i class="icon ZM-Main-icon-font" style="font-size: 16px;color: #A0A0A0;">&#xe612;</i>
					   <span style="color: #A0A0A0" >&nbsp;&nbsp;退出</span>
					</td>
					<td style="width: 26px" rowspan="2"></td>
							</tr>
   				<!-- 顶部导航 -->
   				<tr style="background-color: #fff;height: 38px">
   					<td class="td_title" style="color: #A0A0A0; text-align: left;padding-left: 18px;" id="title">功能名称</td>
		            <td class="td_navbar" style="color: #A0A0A0" id="navbar" >菜单导航</td>
   				</tr>
   			</table>
		</td>
	 </tr>
	 <tr style="height: calc(100vh - 87px);">
		<!-- 这里是左下菜单信息 -->
		<td class="main_title" style="vertical-align: top;">
			<div style="overflow:hidden; width:100%;">
	          <!-- 菜单展示开始 -->
	          <table style="width: 100%; ">
	            <!-- 开始一级菜单 -->
	            <c:forEach var="item" items="${MENU}">
	              <tr style="display:;">
	                <!-- 一级菜单区域ID -->
	                <c:choose>
	                  <c:when test="${item.menuUrl != ''}">
	                    <td id="item_${item.id}" class="level1Menu" onclick="changeBackground('${item.id}');showPageForm('${item.menuUrl}')">
	                        <i id="item_icon_${item.id}" class="icon ZM-Main-icon-font">${item.menuPicUrl}</i>
	                        <span style="font-size: 10px;">&nbsp;</span>${item.menuName} 
	                        <c:if test="${(item.nextSubs)!= null && fn:length(item.nextSubs) > 0}">
	                          <div style="float: right; margin-right: 8px;">
	                            <i id="item_endicon_${item.id}" class="icon ZM-Main-icon-font">&#xe6f6;</i> 
	                            <span style="font-size: 10px; vertical-align: middle;">&nbsp;</span>
	                          </div>
	                        </c:if>
	                    </td>
	                  </c:when>
	                  <c:otherwise>
	                    <td id="item_${item.id}" class="level1Menu" onclick="changeBackground('${item.id}');">
	                        <i id="item_icon_${item.id}" class="icon ZM-Main-icon-font">${item.menuPicUrl}</i> 
	                        <span style="font-size: 10px;">&nbsp;</span>${item.menuName}
	                        <c:if test="${(item.nextSubs)!= null && fn:length(item.nextSubs) > 0}">
	                          <div style="float: right; margin-right: 8px;">
	                            <i id="item_endicon_${item.id}" class="icon ZM-Main-icon-font">&#xe6f6;</i> 
	                            <span style="font-size: 10px; vertical-align: middle;">&nbsp;</span>
	                          </div>
	                        </c:if>
	                    </td>
	                  </c:otherwise>
	                </c:choose>
	              </tr>
	              <!-- 结束一级菜单 -->
	              <!-- 开始二级菜单 -->
	              <c:if test="${(item.nextSubs)!= null && fn:length(item.nextSubs) > 0}">
	                <!-- 结果集大于0，才显示 -->
	                <tr style="display: none;" id="itemMenu_${item.id}">
	                  <!-- 二级菜单区域ID -->
	                  <td>
	                    <table style="margin-left: 8px;">
	                      <c:forEach var="itemSub" items="${item.nextSubs}">
	                        <tr style="height: 38px">
	                          <c:choose>
	                            <c:when test="${itemSub.menuUrl != ''}">
	                              <td id="itemSub_${itemSub.id}" class="level2Menu" onclick="changeBackgroundSub('${itemSub.id}');showPageForm('${itemSub.menuUrl}')">${itemSub.menuName}</td>
	                            </c:when>
	                            <c:otherwise>
	                              <td id="itemSub_${itemSub.id}" class="level2Menu" onclick="changeBackgroundSub('${itemSub.id}');">${itemSub.menuName}</td>
	                            </c:otherwise>
	                          </c:choose>
	                        </tr>
	                      </c:forEach>
	                    </table>
	                  </td>
	                </tr>
	              </c:if>
	              <!-- 结束二级菜单 -->
	            </c:forEach>
	          </table>
	          <!-- 菜单展示结束 -->
	        </div>
		</td>
		<!-- 主要工作区域 -->
		<td>
			<table style="height: 100%;background-color: #F2F2F2;" valign="top" align="center"> 
				<tr>
					<td style="width: 8px"></td>
					<td id="myIframeTD" valign="top" align="center">
        				<iframe src="/pc/1.0/manager/center?token=${token}" style="height: 100%;" allowtransparency="yes" id="BizFrame" name="BizFrame"></iframe>
         			</td>
					<td style="width: 8px"></td>
				</tr>
			</table>
		</td>
	 </tr>
  </table>
  <!-- 静态引入 -->
  <c:import url="/WEB-INF/views/config/msgmodal.jsp" charEncoding="UTF-8" />
  <c:import url="/WEB-INF/views/config/footer.jsp" charEncoding="UTF-8" />
  <!-- 静态引入 -->
  <script src="/public/other/js/easing.js"></script>
  <script src="/custom/framework/js/page.js"></script>
  <script src="/custom/framework/js/manager-main.js"></script>
  <script src="/custom/framework/js/main-menu.js"></script>
</body>
</html>
